import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import AutoImport from 'unplugin-auto-import/vite'

// https://vitejs.dev/config/
export default ({ mode }: any) => {
  console.log('mode', mode)
  console.log('process', process)
  console.log('process.cwd()',process.cwd())
  console.log(loadEnv(mode,process.cwd()))
   return defineConfig({
    plugins: [
      vue(),
      vueJsx(),
      AutoImport({
        imports: ['vue'],
        dts: true,
      }),
    ],
  })
} 
